Object-sensitive cost analysis for concurrent objects
نویسندگان
چکیده
Compilation. This section describes how to transform a program P into an abstract program P, which can be seen as an abstraction of P with respect to the chosen size measure α. The translation is based on replacing each instruction by (linear) constraints which describe its behaviour with respect to the size measure. For example, the instruction x := new C can be replaced by the constraint x = 1 which indicates that the reference variable is different from null. The fact that the formula takes this form is due to the previous choice of size measure for references in Definition 7. In order to simplify the presentation, when it is clear from the context, the same name is used for the original variables (possibly primed or subscripted) and their symbolic sizes. That is, given an integer variable x, the name x is also used in the abstract compilation to denote its value. An important issue in the presented setting is to be able to obtain relations between the size of a variable at different program points. For example, in the size analysis of x := x+ 1, the interest is in the relation ”the value of x after the instruction is equal to the value of x before the instruction plus 1”. This important piece of information can be obtained by using a Static Single Assignment (SSA) transformation, which, together with the abstract compilation, produces the constraint x′ = x+ 1, where x and x′ refer to, respectively, the value of x before and after executing the instruction. To implement the SSA transformation, a mapping ρ of variable names to new variable names (constraint variables) is maintained. Such mapping is referred to as a renaming. The expression ρ[x̄ 7→ ȳ] denotes the update performed by ρ, such that it maps variables x̄ to the new variables ȳ. Modeling shared memory is a main challenge in static analysis of OO programs. Our starting point is [5], which models fields as local variables when the field to be tracked satisfies two soundness conditions: (1) its memory location does not change; and (2) it is always accessed through the same reference (i.e., not through aliases). Both conditions can often be proven statically and the transformation of fields into local variables can then be applied for many fragments of the program. If we ignore concurrency, this approach could be directly adopted for our language. However, concurrency introduces new challenges. Example 8 (treatment of fields at release points). Consider the loop in the readBlock method in Figure 1. Ignoring the await instruction, the above soundness conditions (1) and (2) hold for the field blockS, and hence, we can track it as if it was a local variable. In a concurrent setting, however, while readBlock is executing, another task in the same object might modify the field blockS. Therefore, when analyzing readBlock, we cannot assume that the value of blockS is locally trackable. For instance, readBlock might introduce non-termination if we add a method void p() {blockS = blockS− 2; } to class FileIS. When the await is executed inside the loop, method p might change the value of blockS to a non-positive value, and thus the loop counter i would not decrement. Copyright c © 0000 John Wiley & Sons, Ltd. Softw. Test. Verif. Reliab. (0000) Prepared using stvrauth.cls DOI: 10.1002/stvr 20 E. ALBERT, ET AL.
منابع مشابه
On Attributes of Objects in Object-Oriented Software Analysis
One of the modern paradigms to develop a system is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles. There is a sequence of activities to develop an analysis model. In the first step, we work in developing an initial use case model. Then in the second step, they identify a number of concepts and build a glossary of partic...
متن کاملObjects Identification in Object-Oriented Software Development - A Taxonomy and Survey on Techniques
Analysis and design of object oriented is onemodern paradigms for developing a system. In this paradigm, there are several objects and each object plays some specific roles. Identifying objects (and classes) is one of the most important steps in the object-oriented paradigm. This paper makes a literature review over techniques to identify objects and then presents six taxonomies for them. The f...
متن کاملA Novel Method for Tracking Moving Objects using Block-Based Similarity
Extracting and tracking active objects are two major issues in surveillance and monitoring applications such as nuclear reactors, mine security, and traffic controllers. In this paper, a block-based similarity algorithm is proposed in order to detect and track objects in the successive frames. We define similarity and cost functions based on the features of the blocks, leading to less computati...
متن کاملTime complexity of concurrent programs
We study the problem of automatically computing the time complexity of concurrent object-oriented programs. To determine this complexity we use intermediate abstract descriptions that record relevant information for the time analysis (cost of statements, creations of objects, and concurrent operations), called behavioural types. Then, we define a translation function that takes behavioural type...
متن کاملPick Your Contexts Well: Understanding Object-Sensitivity The Making of a Precise and Scalable Pointer Analysis
Object-sensitivity has emerged as an excellent context abstraction for points-to analysis in object-oriented languages. Despite its practical success, however, object-sensitivity is poorly understood. For instance, for a context depth of 2 or higher, past scalable implementations deviate significantly from the original definition of an object-sensitive analysis. The reason is that the analysis ...
متن کاملHybrid method for full identification of buried objects and surrounding media
This study describes a hybrid technique for identification of buried objects. The objects shape and electromagnetic profile are reconstructed from evaluations of electrical permittivity and conductivity. The method suggests a combination of linear sampling and optimization. Linear sampling method (LSM) is used to recover shape and metaheuristic optimizations essential to reconstruct the inside...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw. Test., Verif. Reliab.
دوره 25 شماره
صفحات -
تاریخ انتشار 2015